home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Developer Utilities / Installer 4.0.3 SDK / Script Examples / Custom UI Example / customUI.r < prev    next >
Encoding:
Text File  |  1994-11-15  |  23.7 KB  |  740 lines  |  [TEXT/MPS ]

  1. //
  2. //    customUI.r    - demonstrates customized User Interface for the Installer
  3. //
  4. //    
  5. //        This example demonstrates usage of the Easy and Custom Frameworks
  6. //        to construct Easy Install and a Custom Install selections.
  7. //
  8. //        Also included are examples to create package comments for all
  9. //        Custom Install packages, Custom Install subpackages, Custom
  10. //        Removal packages, and the method for allowing the user to
  11. //        select the volume and folder as the target for the installation.
  12. //
  13. //        Customizable help screens are implemented.
  14. //
  15. //
  16. //        mark young • 08/18/94
  17. //
  18. //        Copyright 1993-1994, Apple Computer, Inc., All Rights Reserved
  19. //
  20.  
  21. #include "InstallerTypes.r"
  22.  
  23. #define kMainPackage    100
  24. #define kDividerPackage    9999
  25.  
  26. // • easy install setup
  27.  
  28. // easy install framework uses ID other than 765 or 766
  29. // recommended to always use ID 764
  30. resource 'infr' (764) {
  31.     format0 {{
  32.         pickFirst, { 700 },    
  33.     }}
  34. };
  35.  
  36. // rule that adds main package to Easy Install
  37. resource 'inrl' (700) {
  38.     format0 {{
  39.         // add main package and description to Easy Install package list
  40.         AddPackages{{ kMainPackage }},
  41.         AddUserDescription{ "Install three copies of TeachText to your hard disk." },
  42.     }}
  43. };
  44.  
  45. // • custom install setup
  46.  
  47. // custom install framework always uses ID of 766
  48. resource 'infr' (766) {
  49.     format0 {{
  50.         pickFirst, { 800 },    // check system version, if bad give error
  51.     }}
  52. };
  53.  
  54. // rule that adds main package to Custom Install
  55. resource 'inrl' (800) {
  56.     format0 {{
  57.         // add main package to Custom Install package list
  58.         AddCustomItems{{ kMainPackage }},
  59.     }}
  60. };
  61.  
  62.  
  63.  
  64. // • packages
  65.  
  66. resource 'inpk' ( kMainPackage ) {
  67.     format0 {
  68.         showsOnCustom,            // ignored in packages that are added
  69.                                 // to Custom Install via AddCustomItems
  70.                                 // which places packages in the highest
  71.                                 // level of Custom Install choice list
  72.                                 
  73.         removable,                // show under Custom Remove when item
  74.                                 // added to Custom Install via
  75.                                 // AddCustomItems
  76.                                 
  77.         dontForceRestart,        // don't make user reboot after installation
  78.         
  79.         kMainPackage,            // package comments resource ID
  80.         
  81.         0,                        // package size ( if 0, filled by ScriptCheck )
  82.         
  83.         "Everything",            // Custom Install selection description
  84.         {    
  85.         'inpk', 200;            // a subpackage
  86.         'inpk', 300;            // a subpackage
  87.         'inpk', kDividerPackage;// divider line between subpackages
  88.         'inpk', 400;            // a subpackage
  89.         },
  90.     }
  91. };
  92.  
  93. resource 'inpk' (200) {
  94.     format0 {
  95.         showsOnCustom,            // show the package as a selectable item
  96.                                 // item when used as a subpackage
  97.                                 
  98.         removable,                // show under Custom Remove as a selectable
  99.                                 // item, when package is a subpackage
  100.                                 
  101.         dontForceRestart,        // don't make user reboot after installation
  102.         
  103.         200,                    // package comments resource ID
  104.         
  105.         0,                        // package size ( if 0, filled by ScriptCheck )
  106.         
  107.         "TeachText • 1",        // Custom Install selection description
  108.         {    
  109.         'infa', 2000;            // file to install or remove
  110.         },
  111.     }
  112. };
  113.  
  114. resource 'inpk' (300) {
  115.     format0 {
  116.         showsOnCustom,            // show the package as a selectable item
  117.                                 // item when used as a subpackage
  118.                                 
  119.         removable,                // show under Custom Remove as a selectable
  120.                                 // item, when package is a subpackage
  121.                                 
  122.         dontForceRestart,        // don't make user reboot after installation
  123.         
  124.         300,                    // package comments resource ID
  125.         
  126.         0,                        // package size ( if 0, filled by ScriptCheck )
  127.         
  128.         "TeachText • 2",        // Custom Install selection description
  129.         {    
  130.         'infa', 3000;            // file to install or remove
  131.         },
  132.     }
  133. };
  134.  
  135. resource 'inpk' (400) {
  136.     format0 {
  137.         showsOnCustom,            // show the package as a selectable item
  138.                                 // item when used as a subpackage
  139.                                 
  140.         notRemovable,            // show under Custom Remove as a selectable
  141.                                 // item, when package is a subpackage
  142.                                 // • be sure that this item is not available
  143.                                 // to be selected under Custom Remove
  144.                                 
  145.         dontForceRestart,        // don't make user reboot after installation
  146.         
  147.         400,                    // package comments resource ID
  148.         
  149.         0,                        // package size ( if 0, filled by ScriptCheck )
  150.         
  151.         "TeachText • 3",        // Custom Install selection description
  152.         {    
  153.         'infa', 4000;            // file to install or remove
  154.         },
  155.     }
  156. };
  157.  
  158. resource 'inpk' ( kDividerPackage ) {
  159.     format0 {
  160.         showsOnCustom,            // show the divider as package or subpackage
  161.                                 
  162.         notRemovable,            // don't allow divider to be selected 
  163.                                 // under Custom Removal mode
  164.                                 
  165.         dontForceRestart,        // don't make user reboot after removal
  166.         
  167.         0,                        // doesn't need package comments
  168.         
  169.         0,                        // package size is empty
  170.         
  171.         "-",                    // display divider line
  172.         {    
  173.                                 // contents list needs to be empty 
  174.                                 // for divider packages
  175.         },
  176.     }
  177. };
  178.  
  179.  
  180.  
  181. // • package comments
  182.  
  183. // NOTE: The actual file that will be installed in either package is actually 
  184. // TeachText. The information detailed below does not actually correspond to 
  185. // the file being installed and is intended only as an example of how to 
  186. // prepare custom package information resources.
  187.  
  188. // FURTHER NOTE: The values that are assigned to the Custom Package Information 
  189. // resource fields do not actually have any effect on the installation and 
  190. // are ignored during installation. They can however assist the user in 
  191. // choosing which packages they would like to include in their Custom 
  192. // Installation or Custom Removal.
  193.  
  194. // The following included file contains the icons for the two package comments.
  195. // I created the file with the icon resources ( 'ICN#', 'icl4', 'icl8' )
  196. // by opening the application to be installed within ResEdit. I then copied the
  197. // 'ICN#', 'icl4' and 'icl8' icon resources into a new ResEdit file called 
  198. // "Icons.rsrc" and assigned the resource items an ID of 9128, since their 
  199. // original resource ID's had a value that was illegal for use with 'inpc' 
  200. // resources ( they must be over 1024 ).
  201. // - An alternative to this method is to derez the application and to paste 
  202. // the resulting resource definitions into this script file and to let the 
  203. // Rez command build the icons every time that the Installer script is Rezzed. 
  204. // If you happen to forget to include the resources for the icons, ScriptCheck 
  205. // will complain, but you will still be able to use the Rezzed Installer script 
  206. // to successfully perform an installation. 
  207. include "Icons.rsrc";
  208.  
  209. resource 'inpc' ( kMainPackage ) {
  210.     format1 {
  211.         8081994,                // sample date ( 08/08/94 )
  212.         403,                    // sample version ( 4.0.3 )
  213.         
  214.         4500 * 1024,            // RAM required for package ( 4.5 megabytes )
  215.         
  216.         9128,                    // icon resource ID ( 'ICN#', 'icl4', 'icl8' )
  217.                                 // - ID must be greater than 1024
  218.                                 // - resource item is in included rsrc file
  219.                                 
  220.         kMainPackage,            // 'TEXT' resource ID of item  
  221.                                 // containing package description
  222.         
  223.     }
  224. };
  225.  
  226. resource 'inpc' ( 200 ) {
  227.     format1 {
  228.         8081994,                // sample date ( 08/08/94 )
  229.         403,                    // sample version ( 4.0.3 )
  230.         
  231.         3500 * 1024,            // RAM required for package ( 3.5 megabytes )
  232.         
  233.         9128,                    // icon resource ID ( 'ICN#', 'icl4', 'icl8' )
  234.                                 // - ID must be greater than 1024
  235.                                 // - resource item is in included rsrc file
  236.                                 
  237.         200,                    // 'TEXT' resource ID of item  
  238.                                 // containing package description
  239.         
  240.     }
  241. };
  242.  
  243. resource 'inpc' ( 300 ) {
  244.     format1 {
  245.         8081994,                // sample date ( 08/08/94 )
  246.         403,                    // sample version ( 4.0.3 )
  247.         
  248.         4000 * 1024,            // RAM required for package ( 4.0 megabytes )
  249.         
  250.         9128,                    // icon resource ID ( 'ICN#', 'icl4', 'icl8' )
  251.                                 // - ID must be greater than 1024
  252.                                 // - resource item is in included rsrc file
  253.                                 
  254.         300,                    // 'TEXT' resource ID of item  
  255.                                 // containing package description
  256.         
  257.     }
  258. };
  259.  
  260. resource 'inpc' ( 400 ) {
  261.     format1 {
  262.         8081994,                // sample date ( 08/08/94 )
  263.         403,                    // sample version ( 4.0.3 )
  264.         
  265.         4500 * 1024,            // RAM required for package ( 4.5 megabytes )
  266.         
  267.         9128,                    // icon resource ID ( 'ICN#', 'icl4', 'icl8' )
  268.                                 // - ID must be greater than 1024
  269.                                 // - resource item in rezzed script file
  270.                                 
  271.         400,                    // 'TEXT' resource ID of item  
  272.                                 // containing package description
  273.         
  274.     }
  275. };
  276.  
  277.  
  278.  
  279. // The following resource items can easily be created manually by creating 
  280. // 'TEXT' resource items in a ResEdit file and including that file in this 
  281. // script.
  282. // USE: include "fileWithTextItem.rsrc";    
  283. // Resource includes use "include" instead of "#include" 
  284. // and are terminated with a semicolon.
  285.  
  286. // NOTE: The new package comment resource ( 'inpc' ) allows descriptions beyond
  287. // the 255 character limit of the old comment resource ( 'icmt' ), by using
  288. // 'TEXT' type resources for the package description field. 'TEXT' type 
  289. // resources are limited to 32K.
  290.  
  291. data 'TEXT' ( kMainPackage ) {
  292.     "This package contains 'TeachText • 1', 'TeachText • 2' and 'TeachText • 3'. "
  293.     "These items will be installed to a user selectable folder during Custom "
  294.     "Install and 'TeachText • 1' and 'TeachText • 2' will be removed during "
  295.     "Custom Remove. "
  296. };
  297.  
  298. data 'TEXT' ( 200 ) {
  299.     "This package contains 'TeachText • 1'. "
  300. };
  301.  
  302. data 'TEXT' ( 300 ) {
  303.     "This package contains 'TeachText • 2'. "
  304. };
  305.  
  306. data 'TEXT' ( 400 ) {
  307.     "This package contains 'TeachText • 3'. "
  308. };
  309.  
  310.  
  311.  
  312. // • file atoms
  313.  
  314. // file atom for TeachText application #1
  315. resource 'infa' (2000) {
  316.     format1 {
  317.         deleteWhenRemoving,            //     Remove during removal
  318.         deleteWhenInstalling,        //     Remove during installation
  319.         copy,                        //  Copy on Install
  320.         dontIgnoreLockedFile,        //     Respect file locking
  321.         dontSetFileLocked,            //    Don't lock installed file
  322.         useSrcCrDateToCompare,        //    Compare using creation date
  323.         srcNeedExist,                //    Make sure file is on install disk
  324.         rsrcForkInRsrcFork,            //     Put resource info in resource fork
  325.         leaveAloneIfNewer,            //  Warn before updating a newer file
  326.         
  327.         updateExisting,                //  Okay to overwrite existing file
  328.         copyIfNewOrUpdate,            //    Okay to install if tgt doesn't exist
  329.         
  330.         rsrcFork,                    //     Include resource fork
  331.         dataFork,                    //     Include data fork
  332.         
  333.         0,                            //    File size ( filled in by ScriptCheck
  334.                                     //    if this value is zero )
  335.                                     
  336.         0x0,                        //     Finder attributes flags ( filled in
  337.                                     //    by ScriptCheck if this value is zero )
  338.         
  339.         10001,                        // Target spec for file
  340.         {    
  341.             10000,                     //     Source spec for file
  342.             
  343.             0,                         //    Source Data fork size ( filled in
  344.                                     //    by ScriptCheck if this value is zero )
  345.  
  346.             0                         //    Source Resource fork size ( filled in
  347.                                     //    by ScriptCheck if this value is zero )
  348.         },
  349.         
  350.         0,                            //  The source version number in BCD format
  351.                                     //  Ignored when comparing by date
  352.                                     
  353.         0,                            //     Version compare procedure ( 0 : none )
  354.         
  355.         0,                            //  Atom extender resource ID ( 0 : none )
  356.         
  357.         "TeachText from Disk 1"    
  358.                             //     Use this field if you wish to substitute
  359.                             //    some description for the file being installed
  360.                             //     or removed. If "" is used, then Installer
  361.                             //    will use the filename.
  362.                                     
  363.                             //    NOTE: The Installer will display the filename
  364.                             //    or value entered here after the messages
  365.                             //    "Reading < file description >…"
  366.                             //    "Writing < file description >…", etc.
  367.     }
  368. };
  369.  
  370. // file atom for TeachText application #2
  371. resource 'infa' (3000) {
  372.     format1 {
  373.         deleteWhenRemoving,            //     Remove during removal
  374.         deleteWhenInstalling,        //     Remove during installation
  375.         copy,                        //  Copy on Install
  376.         dontIgnoreLockedFile,        //     Respect file locking
  377.         dontSetFileLocked,            //    Don't lock installed file
  378.         useSrcCrDateToCompare,        //    Compare using creation date
  379.         srcNeedExist,                //    Make sure file is on install disk
  380.         rsrcForkInRsrcFork,            //     Put resource info in resource fork
  381.         leaveAloneIfNewer,            //  Warn before updating a newer file
  382.         
  383.         updateExisting,                //  Okay to overwrite existing file
  384.         copyIfNewOrUpdate,            //    Okay to install if tgt doesn't exist
  385.         
  386.         rsrcFork,                    //     Include resource fork
  387.         dataFork,                    //     Include data fork
  388.         
  389.         0,                            //    File size ( filled in by ScriptCheck
  390.                                     //    if this value is zero )
  391.                                     
  392.         0x0,                        //     Finder attributes flags ( filled in
  393.                                     //    by ScriptCheck if this value is zero )
  394.         
  395.         20001,                        // Target spec for file
  396.         {    
  397.             20000,                     //     Source spec for file
  398.             
  399.             0,                         //    Source Data fork size ( filled in
  400.                                     //    by ScriptCheck if this value is zero )
  401.  
  402.             0                         //    Source Resource fork size ( filled in
  403.                                     //    by ScriptCheck if this value is zero )
  404.         },
  405.         
  406.         0,                            //  The source version number in BCD format
  407.                                     //  Ignored when comparing by date
  408.                                     
  409.         0,                            //     Version compare procedure ( 0 : none )
  410.         
  411.         0,                            //  Atom extender resource ID ( 0 : none )
  412.         
  413.         "TeachText from Disk 2"        
  414.                             //     Use this field if you wish to substitute
  415.                             //    some description for the file being installed
  416.                             //     or removed. If "" is used, then Installer
  417.                             //    will use the filename.
  418.                                     
  419.                             //    NOTE: The Installer will display the filename
  420.                             //    or value entered here after the messages
  421.                             //    "Reading < file description >…"
  422.                             //    "Writing < file description >…", etc.
  423.         };
  424. };
  425.  
  426. // file atom for TeachText application #3
  427. resource 'infa' (4000) {
  428.     format1 {
  429.         deleteWhenRemoving,            //     Remove during removal
  430.         deleteWhenInstalling,        //     Remove during installation
  431.         copy,                        //  Copy on Install
  432.         dontIgnoreLockedFile,        //     Respect file locking
  433.         dontSetFileLocked,            //    Don't lock installed file
  434.         useSrcCrDateToCompare,        //    Compare using creation date
  435.         srcNeedExist,                //    Make sure file is on install disk
  436.         rsrcForkInRsrcFork,            //     Put resource info in resource fork
  437.         leaveAloneIfNewer,            //  Warn before updating a newer file
  438.         
  439.         updateExisting,                //  Okay to overwrite existing file
  440.         copyIfNewOrUpdate,            //    Okay to install if tgt doesn't exist
  441.         
  442.         rsrcFork,                    //     Include resource fork
  443.         dataFork,                    //     Include data fork
  444.         
  445.         0,                            //    File size ( filled in by ScriptCheck
  446.                                     //    if this value is zero )
  447.                                     
  448.         0x0,                        //     Finder attributes flags ( filled in
  449.                                     //    by ScriptCheck if this value is zero )
  450.         
  451.         30001,                        // Target spec for file
  452.         {    
  453.             30000,                     //     Source spec for file
  454.             
  455.             0,                         //    Source Data fork size ( filled in
  456.                                     //    by ScriptCheck if this value is zero )
  457.  
  458.             0                         //    Source Resource fork size ( filled in
  459.                                     //    by ScriptCheck if this value is zero )
  460.         },
  461.         
  462.         0,                            //  The source version number in BCD format
  463.                                     //  Ignored when comparing by date
  464.                                     
  465.         0,                            //     Version compare procedure ( 0 : none )
  466.         
  467.         0,                            //  Atom extender resource ID ( 0 : none )
  468.         
  469.         "TeachText from Disk 3"        
  470.                             //     Use this field if you wish to substitute
  471.                             //    some description for the file being installed
  472.                             //     If "" is used, then Installer
  473.                             //    will use the filename.
  474.                                     
  475.                             //    NOTE: The Installer will display the filename
  476.                             //    or value entered here after the messages
  477.                             //    "Reading < file description >…"
  478.                             //    "Writing < file description >…", etc.
  479.         };
  480. };
  481.  
  482.  
  483. // • file specs
  484.  
  485. // target file spec for TeachText application #1
  486. resource 'intf' (10001) {
  487.     format1 {
  488.         noSearchForFile,         // use default search path
  489.         
  490.         TypeCrMustMatch,         // If this is set to TypeCrMustMatch
  491.                                 // then a file with a different type
  492.                                 // and creator than those specified
  493.                                 // below will not be replaced.
  494.                                 // If this is set to TypeCrNeedNotMatch
  495.                                 // then type and creator of an existing
  496.                                 // target file are ignored.
  497.         
  498.         // The Type and Creator fields will be used to set the
  499.         // file's Type and Creator when a new file is created. 
  500.         'APPL',                 // TYPE for new file
  501.         'ttxt',                 // CREATOR for new file
  502.         
  503.         0,                         // finder attribute flags
  504.                                 // filled by ScriptCheck is value is 0
  505.         
  506.         1,                          // creation date for new file
  507.         1,                          // modification date for new file
  508.                                 // NOTE: DATE values are filled
  509.                                 // by ScriptCheck if the value is 1
  510.                                             
  511.         0,                         // search proc ID ( 'insp' ), none used
  512.         
  513.         "folder-user:TeachText • 1"        // path to target file
  514.         }
  515.     };
  516.  
  517.  
  518. // source file spec for TeachText application #1
  519. resource 'infs' (10000) {
  520.     'APPL',                        // TYPE for source file
  521.     'ttxt',                        // CREATOR for source file
  522.     0x1,                        // creation DATE for source file
  523.     noSearchForFile,            // IGNORED in Installer 4.0.x
  524.     TypeCrMustMatch,            // TYPE, CREATOR must match file on install disk
  525.     "Disk 1:TeachText • 1"        // PATH to source file        
  526. };
  527.  
  528. // target file spec for TeachText application #2
  529. resource 'intf' (20001) {
  530.     format1 {
  531.         noSearchForFile,         // use default search path
  532.         
  533.         TypeCrMustMatch,         // If this is set to TypeCrMustMatch
  534.                                 // then a file with a different type
  535.                                 // and creator than those specified
  536.                                 // below will not be replaced.
  537.                                 // If this is set to TypeCrNeedNotMatch
  538.                                 // then type and creator of an existing
  539.                                 // target file are ignored.
  540.         
  541.         // The Type and Creator fields will be used to set the
  542.         // file's Type and Creator when a new file is created. 
  543.         'APPL',                 // TYPE for new file
  544.         'ttxt',                 // CREATOR for new file
  545.         
  546.         0,                         // finder attribute flags
  547.                                 // filled by ScriptCheck is value is 0
  548.         
  549.         1,                          // creation date for new file
  550.         1,                          // modification date for new file
  551.                                 // NOTE: DATE values are filled
  552.                                 // by ScriptCheck if the value is 1
  553.                                             
  554.         0,                         // search proc ID ( 'insp' ), none used
  555.         
  556.         "folder-user:TeachText • 2"        // path to target file
  557.         }
  558.     };
  559.  
  560. // source file spec for TeachText application #2
  561. resource 'infs' (20000) {
  562.     'APPL',                        // TYPE for source file
  563.     'ttxt',                        // CREATOR for source file
  564.     0x1,                        // creation DATE for source file
  565.     noSearchForFile,            // IGNORED in Installer 4.0.x
  566.     TypeCrMustMatch,            // TYPE, CREATOR must match file on install disk
  567.     "Disk 2:TeachText • 2"        // PATH to source file        
  568. };
  569.  
  570. // target file spec for TeachText application #3
  571. resource 'intf' (30001) {
  572.     format1 {
  573.         noSearchForFile,         // use default search path
  574.         
  575.         TypeCrMustMatch,         // If this is set to TypeCrMustMatch
  576.                                 // then a file with a different type
  577.                                 // and creator than those specified
  578.                                 // below will not be replaced.
  579.                                 // If this is set to TypeCrNeedNotMatch
  580.                                 // then type and creator of an existing
  581.                                 // target file are ignored.
  582.         
  583.         // The Type and Creator fields will be used to set the
  584.         // file's Type and Creator when a new file is created. 
  585.         'APPL',                 // TYPE for new file
  586.         'ttxt',                 // CREATOR for new file
  587.         
  588.         0,                         // finder attribute flags
  589.                                 // filled by ScriptCheck is value is 0
  590.         
  591.         1,                          // creation date for new file
  592.         1,                          // modification date for new file
  593.                                 // NOTE: DATE values are filled
  594.                                 // by ScriptCheck if the value is 1
  595.                                             
  596.         0,                         // search proc ID ( 'insp' ), none used
  597.         
  598.         "folder-user:TeachText • 3"    // path to target file
  599.         }
  600.     };
  601.  
  602. // source file spec for TeachText application #3
  603. resource 'infs' (30000) {
  604.     'APPL',                        // TYPE for source file
  605.     'ttxt',                        // CREATOR for source file
  606.     0x1,                        // creation DATE for source file
  607.     noSearchForFile,            // IGNORED in Installer 4.0.x
  608.     TypeCrMustMatch,            // TYPE, CREATOR must match file on install disk
  609.     "Disk 3:TeachText • 3"        // PATH to source file        
  610. };
  611.  
  612. // • Installer prefs resource
  613.  
  614. include "HelpPicts.rsrc";
  615.  
  616. resource 'inpr' ( 300 ) {
  617.     format0{
  618.         useFolderTargetMode,    // allow user to select target folder
  619.                                 // instead of only choosing target volume
  620.                                         
  621.         dontAllowUserToSetSystemDisk,    
  622.                                 // don't allow user to override default
  623.                                 // volume as destination for system files
  624.                                         
  625.         showSelectedSizeInCustom,
  626.                                 // show user how much disk space will be
  627.                                 // required for installation of selected files
  628.                                         
  629.         noSetupFunctionSupplied,// not using a setup function code resource
  630.         
  631.         dontAllowCleanInstall,    // Reserved for use by Apple System Software
  632.                                 // Installer scripts.  Should always be
  633.                                 // dontAllowCleanInstall.
  634.                                         
  635.         dontAllowServerAsTarget,// don't allow user to install to 
  636.                                 // an Apple Share volume or server
  637.                                 // See warnings in Installer Tech. Guide about
  638.                                 // using allowServerAsTarget.
  639.     
  640.         '',            // setup function type ( none supplied )
  641.         0,            // setup function code rsrc ID ( none supplied )
  642.         
  643.                     // NOTE: The setup function feature allows
  644.                     // you to select the default target volume and
  645.                     // default target folder from within a code rsrc. 
  646.                     // This feature is only available when 
  647.                     // 'setupFunctionSupplied' is specified.
  648.                                         
  649.                     // If 'useFolderTargetMode' then the setup function
  650.                     // can set the default target volume and default target
  651.                     // folder. If 'useDiskTargetMode' is specified then
  652.                     // the setup function can only set the default target
  653.                     // volume.
  654.                                         
  655.                     // See the "Setup Function Example" for a
  656.                     // demonstration of how to implement a setup
  657.                     // function in your Installer script.
  658.                                         
  659.         {
  660.         // NOTE: In the examples below, all the PICT's are actually 8-bit 
  661.         // grayscale images. This was done for sake of simplicity, since
  662.         // these images are suitable for display in either monochrome or 
  663.         // color and reduce the number of images that needed to be included
  664.         // for this example.
  665.             
  666.         // • Help PICT's in General
  667.             
  668.         // - On any given screen, when the Installer Help Dialog is open
  669.         // there will be two PICT's displayed. One PICT which is tall and thin
  670.         // is displayed on the left is intended to contain some kind of graphic.
  671.         // The other PICT which is wide and short, is displayed on the right, and
  672.         // is intended to contain text imbedded in a PICT.
  673.             
  674.         // - If the screen that the Help Dialog is displayed on is a monochrome
  675.         // screen, then the first pair of PICT's will be displayed for the 
  676.         // current page of the Installer Help.
  677.         
  678.         // - If the screen that the Help Dialog is displayed within is a color
  679.         // screen, then the second pair of PICT's will be displayed for the 
  680.         // current page of the Installer Help.
  681.             
  682.         // - As the user clicks in the PREVIOUS and NEXT buttons that appear
  683.         // in the Help Dialog, the pages will be advanced according to the
  684.         // order that the sets of PICT's are defined below.
  685.         
  686.         // - When the Installer draws the PICT's in the Help Dialog, no resizing
  687.         // is preformed. This means that everything too large to fit into the
  688.         // Help Dialog will be clipped to the size of the window and will be  
  689.         // invisible to the user.
  690.             
  691.         // • the help PICT resources that come with the Apple Installer 4.0
  692.             
  693.         // - These resources are actually in the Installer app itself and will
  694.         // automatically appear when the HELP button is pressed in the Installer
  695.         // if the 'inpr' is defined as it is below for help pages #1 and #2
  696.             
  697.             // help page #1
  698.             
  699.             301,            // B/W graphic section (ID of 'PICT' rsrc)
  700.             311,            // B/W text section (ID of 'PICT' rsrc)
  701.             301,            // 8-Bit Color graphic section (ID of 'PICT' rsrc)
  702.             311,            // 8-Bit Color text section (ID of 'PICT' rsrc)
  703.             
  704.             // help page #2
  705.             302,            // B/W graphic section (ID of 'PICT' rsrc)
  706.             312,            // B/W text section (ID of 'PICT' rsrc)
  707.             302,            // 8-Bit Color graphic section (ID of 'PICT' rsrc)
  708.             312,            // 8-Bit Color text section (ID of 'PICT' rsrc)
  709.             
  710.             // • some customized help PICT resources added for this example
  711.             
  712.         // - the PICT resources listed below were created in graphics program
  713.         // by copying the PICT's out of the Installer application, and then
  714.         // pasting them into a graphics application. The original PICT images
  715.         // were modified ( being careful to keep the items the exact same size )
  716.         // and then pasted into a file called "HelpPicts.rsrc". This file was 
  717.         // then included in the Installer script immediately above the beginning
  718.         // of the definition of this 'inpr' resource.
  719.             
  720.             // help page #3
  721.             9128,            // B/W graphic section (ID of 'PICT' rsrc)
  722.             9129,            // B/W text section (ID of 'PICT' rsrc)
  723.             9128,            // 8-Bit Color graphic section (ID of 'PICT' rsrc)
  724.             9129,            // 8-Bit Color text section (ID of 'PICT' rsrc)m
  725.             
  726.             // etc., continue with additional sets of help pages
  727.         },
  728.         
  729.         "Custom UI Example"            // default target folder name
  730.         
  731.                             // NOTE: This field is only used when
  732.                             // 'useFolderTargetMode' is specified.
  733.                             // This field is ignored when 'useDiskTargetMode'
  734.                             // is specified.
  735.     }
  736.  
  737. };
  738.  
  739.  
  740.